From 87a12f54d3388557c476de27828ac06d19bdb69f Mon Sep 17 00:00:00 2001 From: "tw275@striker.cl.cam.ac.uk" Date: Thu, 1 Jul 2004 16:37:02 +0000 Subject: [PATCH] bitkeeper revision 1.1041.1.9 (40e43dae6tkOjKpGS7n77Q_WIw-vwg) Fixing drive finding with scsi arrays in Xend --- BitKeeper/etc/logging_ok | 1 + tools/python/xen/xend/XendDomainInfo.py | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 04eb20bb84..bcbf3eae42 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -39,4 +39,5 @@ smh22@uridium.cl.cam.ac.uk sos22@labyrinth.cl.cam.ac.uk tlh20@elite.cl.cam.ac.uk tlh20@labyrinth.cl.cam.ac.uk +tw275@striker.cl.cam.ac.uk xenbk@gandalf.hpl.hp.com diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index c0de8fed01..869fc28e07 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -79,8 +79,13 @@ def lookup_raw_partn(partition): if not re.match( '/dev/', partition ): partition = '/dev/' + partition - - drive = re.split( '[0-9]', partition )[0] + + """Try and match non-standard scsi raid arraysa + """ + if re.match( '/dev/cciss/c[0-9]+d[0-9]+p[0-9]+', partition ): + drive = re.split( 'p[0-9]+', partition )[0] + else: + drive = re.split( '[0-9]', partition )[0] if drive == partition: fd = os.popen( '/sbin/sfdisk -s ' + drive + ' 2>/dev/null' ) -- 2.30.2